package com.wocao.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wocao.entity.SysDictData;
import com.wocao.entity.SysDictType;
import com.wocao.entity.SysDictTypeAndDateCheck;
import com.wocao.mapper.SysDictDataMapper;
import com.wocao.mapper.SysDictTypeMapper;
import com.wocao.service.SysDictDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 字典数据表 服务实现类
 */
@Service
public class SysDictDataServiceImpl extends ServiceImpl<SysDictDataMapper, SysDictData> implements SysDictDataService {

    @Autowired
    SysDictDataMapper sysDictDataMapper;
    @Override
    public List<SysDictData> selectByTree(SysDictTypeAndDateCheck DateCheck) {
        return sysDictDataMapper.selectByTree(DateCheck.getDictType(),DateCheck.getStatus(), DateCheck.getDictLabel());
    }
    @Override
    public Page<SysDictData> getPage(Page<SysDictData> objectPage, SysDictTypeAndDateCheck s) {
        return sysDictDataMapper.getPage(objectPage,s.getDictType() ,s.getStatus(),s.getDictLabel());
    }
}
